-- GENERATED SPELL FOR [Malgin Barleybrew] --


function spell0_5848(pUnit, Event) --@Battle Fury,Self--
pUnit:FullCastSpellOnTarget(3631,pUnit)
pUnit:RegisterEvent('Sorts_5848', 610, 1)
end

function spell1_5848(pUnit, Event) --@Battle Shout,Self--
pUnit:FullCastSpellOnTarget(5242,pUnit)
pUnit:RegisterEvent('Sorts_5848', 693, 1)
end

function Sorts_5848(pUnit, Event)
local choix_sorts_5848 = math.random(0, 1)
if choix_sorts_5848 == 0 then
pUnit:RegisterEvent('spell0_5848', 1, 1)
end
if choix_sorts_5848 == 1 then
pUnit:RegisterEvent('spell1_5848', 1, 1)
end
end

function mob5848_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5848', math.random(1500, 3000), 1)
end

function mob5848_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5848_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5848_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5848, 1, 'mob5848_Action')
RegisterUnitEvent(5848, 2, 'mob5848_Leave')
RegisterUnitEvent(5848, 3, 'mob5848_Kill')
RegisterUnitEvent(5848, 4, 'mob5848_Die')
